﻿using Shop.Model.Attr;
using Shop.Model.DB;
using WeDonekRpc.SqlSugar;

namespace Shop.Repository.lmpl
{
    internal class GoodsAttrRepository : ShopBaseRepository<DBGoodsAttr, long>, IGoodsAttrRepository
    {
        public GoodsAttrRepository (ISqlClientFactory factory) : base(factory)
        {
        }

        public GoodsAttrDto[] Gets (long goodsId)
        {
            return base.Gets<GoodsAttrDto>(a => a.GoodsId == goodsId, "Sort");
        }
        public GoodsAttrDto[] GetsBySkuId (long skuId)
        {
            return base.Gets<GoodsAttrDto>(a => a.SkuId == skuId, "Sort");
        }
    }
}
